package org.dhbw.oodb.dmlp.dao;

import java.util.List;

import org.springframework.orm.jpa.support.JpaDaoSupport;
import org.springframework.transaction.annotation.Transactional;

public abstract class GenericDaoImpl<T> extends JpaDaoSupport implements GenericDao<T> {

	@Transactional("JPATX")
	public T insertJPA(T object) {
		getJpaTemplate().persist(object);
		getJpaTemplate().flush();
		return object;
	}
	
	
	protected abstract Class<T> getEntityClass(); 
	
}
